package com.lulin.mall.order.dao;

import com.lulin.mall.order.entity.OrderEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * 订单
 *
 * @author lulin
 * @email 2032327049@qq.com
 * @date 2022-09-21 17:08:00
 */
@Mapper
public interface OrderDao extends BaseMapper<OrderEntity> {
    /**
     * 根据订单编号，查询出相关的订单信息
     *
     * @param orderSn 订单号
     */
    OrderEntity getOrderByOrderSn(@Param("orderSn") String orderSn);

    /**
     * 根据订单编号，更新订单状态
     *
     * @param orderSn 订单编号
     * @param status  订单状态
     */
    void updateOrderStatus(@Param("orderSn") String orderSn, @Param("status") Integer status);
}
